package com.zmj.service;

import com.zmj.entity.Book;
import com.zmj.mapper.BookMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookService {
    @Autowired
    private BookMapper bookMapper;

    public List<Book> selAll(int flag){
       return bookMapper.selAll(flag);
    }
    public  boolean add(Book book){
        return bookMapper.add(book);
    }
    public  boolean del (int flag,int id){
        return bookMapper.del(flag,id);
    }
    public  boolean update(Book book){
        return bookMapper.update(book);
    }
    public  Book selOne(int id){
        return bookMapper.selOne(id);
    }
}
